<template>
  <div>
    <div style="height: 80px;"></div>
    <div align="center">
      <Login v-if="showIndex == 0" @toRegister="showIndex = 1" @loginSuccess="loginSuccess" />
      <Register v-if="showIndex == 1" @toLogin="showIndex = 0" />
    </div>
  </div>
</template>

<script>
import Login from "@/components/Login/Login";
import Register from "@/components/Login/Register";

export default {
  name: "App",
  components: {
    Login: Login,
    Register: Register,
  },
  data() {
    return {
      showIndex: 0,
    };
  },
  methods: {
    loginSuccess() {
      this.$emit("loginSuccess");
    },
  },
};
</script>

<style scoped>
</style>
